home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
TSPA3450
/
TSERR.TST
< prev
next >
Wrap
Text File
|
1993-11-28
|
1KB
|
66 lines
{$R+} (* Index range check on *)
(* This is a test program for the TSERR.TPU unit
23-Jan-93, 28-Nov-93 *)
uses TSERR;
procedure LOGO;
begin
writeln;
writeln ('TSERR unit test by Prof. Timo Salmi');
writeln ('University of Vaasa, Finland, ts@uwasa.fi');
{$IFDEF VER40}
writeln ('TP version 4.0');
{$ENDIF}
{$IFDEF VER50}
writeln ('TP version 5.0');
{$ENDIF}
{$IFDEF VER55}
writeln ('TP version 5.5');
{$ENDIF}
{$IFDEF VER60}
writeln ('TP version 6.0');
{$ENDIF}
{$IFDEF VER70}
writeln ('TP version 7.0');
{$ENDIF}
writeln;
end;
procedure TEST1;
var s : string[79];
i : byte;
begin
i := 80;
s[i] := ' ';
end; (* test1 *)
procedure TEST2;
var x : real;
begin
x := 7.0; writeln (1.0/x);
x := 0.0; writeln (1.0/x);
x := 7.0; writeln (4.0/x);
end; (* test2 *)
procedure TEST3;
var f : file;
begin
assign (f, 'c:\NosuchF.ile');
reset (f);
close (f);
end; (* test3 *)
(* Main program *)
begin
LOGO;
TEST1;
{}
TEST2; { Because test1 results in an error you have to omit it, }
{ if you want test2, and so on }
{}
TEST3;
write ('Press «═╝ '); readln;
end. (* tserr.tst *)